#/*************************************************************************
#    > File Name: examples/example_ROOT.py
#    > Author: Yan Wang
#    > Mail: wangyan@imnu.edu.cn
#    > Created Time: 2022年10月13日 星期四 14时41分18秒
# ************************************************************************/
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys   
sys.path.append('./Lib/')   
from Load_Lib import *  

print("The examples in this file are:")   
ex_name={"1":"ROOT_Get_AllEntries_Number and ROOT_Get_FinalState_Number"
        ,"2":"ROOT_Get_AllEntries_Number"
        ,"all":"all examples"}    #字典，所有对应函数为Lib/Content_Operation.py
for key in ex_name:
    print(key, ex_name[key])       #if条件语句，如果key在ex_name里面，则输出eg：1 Find_Line
num=input("请输入想要运行的例子：") 


if num == "1" or num == ex_name["1"] or num == "all": 
    file_name="/home/yancywww/Software/bin/MG5_aMC_v3_5_3/Events_mh_mch_20/THDM_hA_4tau_1/Events/run_01/tag_1_delphes_events.root"
    commands=[ROOT_Get_AllEntries_Number, ROOT_Get_FinalState_Number]
    results=ROOT_Running_Code(file_name,commands)

elif num == "2" or num == ex_name["2"] or num == "all": 
    file_name="/home/yancywww/Software/bin/MG5_aMC_v3_5_3/Events_mh_mch_ATLAS_pt10_13TeV/THDM_hA_4tau_1/Events/run_01/tag_1_delphes_events.root"
    file_name=Path(file_name)
    print(type(file_name))
    Exhibit_Function(ROOT_Get_AllEntries_Number,[file_name])
